package com.sgb.goods.view.adapter.publish;

import android.content.Context;

import androidx.recyclerview.widget.RecyclerView;

import com.sgb.goods.BR;
import com.sgb.goods.R;
import com.sgb.goods.entity.MenuEntity;
import com.swgk.core.recyclerview.secondary.DescHolder;
import com.swgk.core.recyclerview.secondary.HeaderHolder;
import com.swgk.core.recyclerview.secondary.SectionedRecyclerViewAdapter;

import java.util.List;

public class CategoryRightAdapter3 extends SectionedRecyclerViewAdapter<MenuEntity, MenuEntity, HeaderHolder, DescHolder, RecyclerView.ViewHolder> {

    public CategoryRightAdapter3(Context context, List<MenuEntity> datas) {
        super(context, R.layout.goods_item_category_right_header3, R.layout.goods_item_category_right_header3, datas);
    }

    @Override
    protected void onBindSectionHeaderViewHolder(HeaderHolder holder, int section, MenuEntity secondaryEntity) {
        holder.setBinding(com.sgb.goods.BR.viewModel, secondaryEntity);
        holder.getItem().setTag(secondaryEntity.name);
    }

    @Override
    protected void onBindSectionFooterViewHolder(RecyclerView.ViewHolder holder, int section) {

    }

    @Override
    protected void onBindItemViewHolder(DescHolder holder, int section, int position, MenuEntity entity) {
        holder.setBinding(BR.viewModel, entity);
    }
}